﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Demo0521
{
    enum NpcType 
    {
        //npc类型枚举
        //任务npc
        Task,
        //商贩npc
        Pedlar,
        //铁匠npc
        Smithy
    }
    //抽象化NPC父类
    abstract class NPC
    {
        //定义npc名字和类型
        private string name;
        private NpcType type;
        //定义属性
        public string Name{get { return this.name; }set { this.name = value; }}
        public NpcType Type {get { return this.type; }set { this.type = value; }}
        //初始化父类
        public NPC() { }
        public NPC(string name,NpcType type) 
        {
            this.name = name;
            this.type = type;
        }
        //定义抽象方法(交谈)
        public abstract void Chat();

    }
}
